<<<<<<< HEAD
<%@ page contentType="text/html; charset=utf-8" language="java"  %>
<%@ include file="../../common/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <title>无标题文档</title>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/<%=AppContext.getProperties("systemcolor")%>/css/page.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/<%=AppContext.getProperties("systemcolor")%>/css/a_icon.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/<%=AppContext.getProperties("systemcolor")%>/css/ui/jquery-ui-1.10.3.custom.css"/>
		
		<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery-1.9.1.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery-ui-1.10.3.custom.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery.form.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/script/checkbox_tr.js"></script>
		<script type="text/javascript">
		function doSearch(){	
				$("#dataForm").attr("action","./mywork!doListByAppId.action?entity.workState=noStart&isExpand=${expand}&appId=${appId}&appName={appName}") ;
			$("#dataForm").submit();	
		}
		function delDatas(workId){
			$.jConfirm('提示','确定要删除吗？',function(r){
				if(r){
					$.ajax({
			            type : "POST",
						url : "../jbpmService/deleteWork",
						data: "workId="+workId,															
						success : function(msg){	
							if(msg == "删除成功！"){
								window.location.href=window.location.href;
							}else{
								alert(msg);
							}
						}
				     });
				}
			})	
		}
		function delWorks(){
		    var flag = false;
   			var de = document.getElementsByName("delId");
   			for(i = 0; i < de.length; i++){
       			if(de[i].checked == true){
           			flag = true;
           			break;
       			} 
    		}		
    		if(flag == false){
    		      $.jAlert('提示',"至少选择一个待删除记录",'info');
      			  return false;
  			}
  			
			$.jConfirm("确定对话框","代办中如果有相关信息将一并删除,确定要删除吗?", function(r){
				if (r){
					 document.listWork.action="mywork!deldraftWorks.action?locationFlag=oneApp&appName={appName}" ;
	                 document.listWork.submit(); 
			    }
			});
		}
		</script>
</head>
<body >
	<!-- 搜索面板 -->
	<div class="searchPanel">
		<form id="dataForm" name="search"  method="post" class="search" style="margin-top: 8px; border-right-width: 8px; margin-right: 18px;">
			<s:if test="entity.workState!='start'">
	            <s:if test="entity.workTitle == null">
					<input id="workTitle" name="entity.workTitle" type="text" class="input01" value="请输入标题名"
						onblur="if(this.value == '') this.value = this.defaultValue"
						onfocus="if(this.value == this.defaultValue) this.value = ''" />
				</s:if>
				<s:else>
					<input id="workTitle" name="entity.workTitle" type="text" class="input01" value="${entity.workTitle }"
						onblur="if(this.value == '') this.value = '请输入标题名'"
						onfocus="if(this.value == '请输入标题名') this.value = ''" />
				</s:else>
				<input type="button" value="查询" onclick="javascript:doSearch();" />
			</s:if>
        </form>
	</div>
	<!-- 内容面板 -->
	<div class="contentPanel">
		<form name="listWork" id="workSearch" method="post">
		<input type="hidden" name="appId" id="workState" value="${appId}" />
		<input type="hidden" name="entity.workState" id="workState" value="${entity.workState}" />
		<input type="hidden" name="expand" id="expand" value="${expand}" />
		<table>
           	<tr>
				<s:if test="entity.workState!='start'">
					<th width="5%">
                        <input  type="checkbox" />
                    </th>
					<th>
						标题
					</th>
					<!-- <th>
						应用名称
					</th> -->
					<!-- <th>
						工作序号
					</th> -->
					<th>
						起草时间
					</th>
					<th>
						结束时间
					</th>
					<th>
						当前状态
					</th>
				</s:if>
				<s:if test="entity.workState=='start'">
					<th width="5%">
                        <input  type="checkbox" />
                    </th>
					<th>
						标题
					</th>
					<!-- <th>
						应用名称
					</th> -->
					<th>
						起草时间
					</th>
					<th>
						操作
					</th>
				</s:if>
			</tr>
            <s:if test="empty list">
                <tr>
	             	<s:if test="entity.workState!='start'">
	                	<td colspan="7">暂无数据！</td>
	                </s:if>
	             	<s:if test="entity.workState=='start'">
	                	<td colspan="5">暂无数据！</td>
	                </s:if>
               </tr>
           	</s:if>
			<s:iterator value="list" var="view">
				<tr>
					<s:if test="entity.workState!='start'">
						<td>
							<input type="checkbox" name="delId" value="<s:property value='#view.workId'/>" />
						</td>
						<s:if test="#view.workTitle==null or #view.workTitle==''">
							<td>
								<a target="_blank"
									href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.appName'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.appName'/></span>
								</a>
							</td>
						</s:if>
						<s:else>
							<td>
								<a target="_blank"
									href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.workTitle'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.workTitle'/></span>
								</a>
							</td>
						</s:else>
						<%-- <td>${view.appName }</td> --%>
						<%-- <td>${view.seqNum }</td> --%>
						<td>
							<fmt:formatDate value="${view.startTime }" pattern="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<fmt:formatDate value="${view.endTime }" pattern="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<span title="${view.curActivityName}" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;">${view.curActivityName}</span>
						</td>
					</s:if>
					<s:if test="entity.workState=='start'">
						<td>
							<input type="checkbox" name="delId" value="<s:property value='#view.workId'/>" />
						</td>
						<s:if test="#view.workTitle==null or #view.workTitle==''">
							<td>
								<a target="_blank" href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.appName'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.appName'/></span>
								</a>
							</td>
						</s:if>
						<s:else>
							<td>
								<a target="_blank" href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.workTitle'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.workTitle'/></span>
								</a>
							</td>
						</s:else>
						<td>${view.appName }</td>
						<td>
							<fmt:formatDate value="${view.startTime }" pattern="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<a class="icon icon-delete" title="删除草稿" onclick="javascript:delDatas('${view.workId}');">删除</a>
						</td>
					</s:if>
				</tr>
			</s:iterator>
		</table>
        </form>
	</div>
	<!-- 底页 -->
	<div class="footPanel">
        <!--底部操作区
		<div class="handlePanel">
			<a href="javascript:void(0);" class="button" onclick="javascript:delWorks();">删除</a>
		</div>
		-->
        <!--分页区-->
		<div class="pagePanel">
			<thx:pages pageNo="page.curPage" total="page.totalPage"  theme="text" styleClass="themeText">
				<s:param name="entity.workState" value="entity.workState"></s:param>
				<s:param name="entity.workType" value="entity.workType"></s:param>
				<s:param name="isExpand" value="isExpand"></s:param>
				<s:param name="isExpand" value="isExpand"></s:param>
				<s:param name="appId" value="appId"></s:param>
				<s:param name="appName" value="appName"></s:param>
			</thx:pages>
		</div>
	</div>
</body>
=======
<%@ page contentType="text/html; charset=utf-8" language="java"  %>
<%@ include file="../../common/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <title>无标题文档</title>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/<%=AppContext.getProperties("systemcolor")%>/css/page.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/<%=AppContext.getProperties("systemcolor")%>/css/a_icon.css" />
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/<%=AppContext.getProperties("systemcolor")%>/css/ui/jquery-ui-1.10.3.custom.css"/>
		
		<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery-1.9.1.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery-ui-1.10.3.custom.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery.form.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/script/checkbox_tr.js"></script>
		<script type="text/javascript">
		function doSearch(){	
				$("#dataForm").attr("action","./mywork!doListByAppId.action?entity.workState=noStart&isExpand=${expand}&appId=${appId}&appName={appName}") ;
			$("#dataForm").submit();	
		}
		function delDatas(workId){
			$.jConfirm('提示','确定要删除吗？',function(r){
				if(r){
					$.ajax({
			            type : "POST",
						url : "../jbpmService/deleteWork",
						data: "workId="+workId,															
						success : function(msg){	
							if(msg == "删除成功！"){
								window.location.href=window.location.href;
							}else{
								alert(msg);
							}
						}
				     });
				}
			})	
		}
		function delWorks(){
		    var flag = false;
   			var de = document.getElementsByName("delId");
   			for(i = 0; i < de.length; i++){
       			if(de[i].checked == true){
           			flag = true;
           			break;
       			} 
    		}		
    		if(flag == false){
    		      $.jAlert('提示',"至少选择一个待删除记录",'info');
      			  return false;
  			}
  			
			$.jConfirm("确定对话框","代办中如果有相关信息将一并删除,确定要删除吗?", function(r){
				if (r){
					 document.listWork.action="mywork!deldraftWorks.action?locationFlag=oneApp&appName={appName}" ;
	                 document.listWork.submit(); 
			    }
			});
		}
		</script>
</head>
<body >
	<!-- 搜索面板 -->
	<div class="searchPanel">
		<form id="dataForm" name="search"  method="post" class="search" style="margin-top: 8px; border-right-width: 8px; margin-right: 18px;">
			<s:if test="entity.workState!='start'">
	            <s:if test="entity.workTitle == null">
					<input id="workTitle" name="entity.workTitle" type="text" class="input01" value="请输入标题名"
						onblur="if(this.value == '') this.value = this.defaultValue"
						onfocus="if(this.value == this.defaultValue) this.value = ''" />
				</s:if>
				<s:else>
					<input id="workTitle" name="entity.workTitle" type="text" class="input01" value="${entity.workTitle }"
						onblur="if(this.value == '') this.value = '请输入标题名'"
						onfocus="if(this.value == '请输入标题名') this.value = ''" />
				</s:else>
				<input type="button" value="查询" onclick="javascript:doSearch();" />
			</s:if>
        </form>
	</div>
	<!-- 内容面板 -->
	<div class="contentPanel">
		<form name="listWork" id="workSearch" method="post">
		<input type="hidden" name="appId" id="workState" value="${appId}" />
		<input type="hidden" name="entity.workState" id="workState" value="${entity.workState}" />
		<input type="hidden" name="expand" id="expand" value="${expand}" />
		<table>
           	<tr>
				<s:if test="entity.workState!='start'">
					<th width="5%">
                        <input  type="checkbox" />
                    </th>
					<th>
						标题
					</th>
					<!-- <th>
						应用名称
					</th> -->
					<!-- <th>
						工作序号
					</th> -->
					<th>
						起草时间
					</th>
					<th>
						结束时间
					</th>
					<th>
						当前状态
					</th>
				</s:if>
				<s:if test="entity.workState=='start'">
					<th width="5%">
                        <input  type="checkbox" />
                    </th>
					<th>
						标题
					</th>
					<!-- <th>
						应用名称
					</th> -->
					<th>
						起草时间
					</th>
					<th>
						操作
					</th>
				</s:if>
			</tr>
            <s:if test="empty list">
                <tr>
	             	<s:if test="entity.workState!='start'">
	                	<td colspan="7">暂无数据！</td>
	                </s:if>
	             	<s:if test="entity.workState=='start'">
	                	<td colspan="5">暂无数据！</td>
	                </s:if>
               </tr>
           	</s:if>
			<s:iterator value="list" var="view">
				<tr>
					<s:if test="entity.workState!='start'">
						<td>
							<input type="checkbox" name="delId" value="<s:property value='#view.workId'/>" />
						</td>
						<s:if test="#view.workTitle==null or #view.workTitle==''">
							<td>
								<a target="_blank"
									href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.appName'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.appName'/></span>
								</a>
							</td>
						</s:if>
						<s:else>
							<td>
								<a target="_blank"
									href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.workTitle'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.workTitle'/></span>
								</a>
							</td>
						</s:else>
						<%-- <td>${view.appName }</td> --%>
						<%-- <td>${view.seqNum }</td> --%>
						<td>
							<fmt:formatDate value="${view.startTime }" pattern="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<fmt:formatDate value="${view.endTime }" pattern="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<span title="${view.curActivityName}" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;">${view.curActivityName}</span>
						</td>
					</s:if>
					<s:if test="entity.workState=='start'">
						<td>
							<input type="checkbox" name="delId" value="<s:property value='#view.workId'/>" />
						</td>
						<s:if test="#view.workTitle==null or #view.workTitle==''">
							<td>
								<a target="_blank" href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.appName'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.appName'/></span>
								</a>
							</td>
						</s:if>
						<s:else>
							<td>
								<a target="_blank" href="${pageContext.request.contextPath}/jbpmService/getWorkByWorkId?workId=<s:property value='#view.workId'/>">
									<span title="<s:property value='#view.workTitle'/>" style="width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; text-align: center;display: inline-block;"><s:property value='#view.workTitle'/></span>
								</a>
							</td>
						</s:else>
						<td>${view.appName }</td>
						<td>
							<fmt:formatDate value="${view.startTime }" pattern="yyyy-MM-dd HH:mm" />
						</td>
						<td>
							<a class="icon icon-delete" title="删除草稿" onclick="javascript:delDatas('${view.workId}');">删除</a>
						</td>
					</s:if>
				</tr>
			</s:iterator>
		</table>
        </form>
	</div>
	<!-- 底页 -->
	<div class="footPanel">
        <!--底部操作区
		<div class="handlePanel">
			<a href="javascript:void(0);" class="button" onclick="javascript:delWorks();">删除</a>
		</div>
		-->
        <!--分页区-->
		<div class="pagePanel">
			<thx:pages pageNo="page.curPage" total="page.totalPage"  theme="text" styleClass="themeText">
				<s:param name="entity.workState" value="entity.workState"></s:param>
				<s:param name="entity.workType" value="entity.workType"></s:param>
				<s:param name="isExpand" value="isExpand"></s:param>
				<s:param name="isExpand" value="isExpand"></s:param>
				<s:param name="appId" value="appId"></s:param>
				<s:param name="appName" value="appName"></s:param>
			</thx:pages>
		</div>
	</div>
</body>
>>>>>>> branch 'master' of https://git.oschina.net/qinggroup/qing-framework.git
</html>
